package com.jumi.microservice.controller.logistics.admin;

import com.jumi.microservice.common.base.BaseController;
import com.jumi.microservice.common.base.dto.ResponseResult;
import com.jumi.microservice.dto.logistics.LogisticsSearchRequest;
import com.jumi.microservice.dto.logistics.LogisticsSearchResponse;
import com.jumi.microservice.service.IOrderService;
import com.jumi.microservice.service.logistics.express.ExpressTool;
import com.jumi.microservice.service.logistics.express.KdApiOrderDistinguish;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * @author by mazhao
 * @Classname LogisticsController
 * @Description TODO
 * @Date 2020/8/21 15:28
 */
@RestController
@RequestMapping("/admin/logistics")
@Api(tags = {"快递查询接口"})
public class LogisticsController extends BaseController {

    @Resource
    ExpressTool expressTool;

    @ApiOperation("快递查询")
    @PostMapping("/expressSearch")
    public ResponseResult<LogisticsSearchResponse> searchExpress(LogisticsSearchRequest request) throws Exception {
        LogisticsSearchResponse logisticsSearchResponse = expressTool.adminSearch(request);
        return success(logisticsSearchResponse);
    }


}
